package yt.MajorClass.service.impl;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import yt.MajorClass.entity.DataVO;
import yt.MajorClass.entity.Xgk;
import yt.MajorClass.mapper.XgkMapper;
import yt.MajorClass.service.AdminService;

import java.util.List;

/**
 * @author yt1105
 * @version 1.0
 */
@Service
public class AdminImpl implements AdminService {

    @Autowired
    XgkMapper xgkMapper;
    @Override
    public DataVO find() {
        DataVO dataVO = new DataVO();
        dataVO.setCode(0);
        dataVO.setMsg("");
        dataVO.setCount(xgkMapper.selectCount(null)
        );
        List<Xgk> xgkList = xgkMapper.selectList(null);
        dataVO.setData(xgkList);
        return dataVO;
    }
}
